import axios from 'axios'
import Vue from 'vue'

axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1'

axios.interceptors.request.use((res) => {
    res.headers.Authorization = window.sessionStorage.getItem('token')
    return res
});

//创建为全局文件,将$axios封装为axios
Vue.prototype.$axios = axios;
Vue.config.productionTip = false

export default axios;

